Integrand size = 21, antiderivative size = 53 \[ \int \cot ^5(e+f x) \left (a+b \tan ^2(e+f x)\right ) \, dx=\frac {(a-b) \cot ^2(e+f x)}{2 f}-\frac {a \cot ^4(e+f x)}{4 f}+\frac {(a-b) \log (\sin (e+f x))}{f} \]
[Out]
Time = 0.06 (sec) , antiderivative size = 53, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.190, Rules used = {3710, 12, 3554, 3556} \[ \int \cot ^5(e+f x) \left (a+b \tan ^2(e+f x)\right ) \, dx=\frac {(a-b) \cot ^2(e+f x)}{2 f}+\frac {(a-b) \log (\sin (e+f x))}{f}-\frac {a \cot ^4(e+f x)}{4 f} \]
[In]
[Out]
Rule 12
Rule 3554
Rule 3556
Rule 3710
Rubi steps \begin{align*} \text {integral}& = -\frac {a \cot ^4(e+f x)}{4 f}-\int (a-b) \cot ^3(e+f x) \, dx \\ & = -\frac {a \cot ^4(e+f x)}{4 f}-(a-b) \int \cot ^3(e+f x) \, dx \\ & = \frac {(a-b) \cot ^2(e+f x)}{2 f}-\frac {a \cot ^4(e+f x)}{4 f}-(-a+b) \int \cot (e+f x) \, dx \\ & = \frac {(a-b) \cot ^2(e+f x)}{2 f}-\frac {a \cot ^4(e+f x)}{4 f}+\frac {(a-b) \log (\sin (e+f x))}{f} \\ \end{align*}
Time = 0.26 (sec) , antiderivative size = 56, normalized size of antiderivative = 1.06 \[ \int \cot ^5(e+f x) \left (a+b \tan ^2(e+f x)\right ) \, dx=\frac {2 (a-b) \cot ^2(e+f x)-a \cot ^4(e+f x)+4 (a-b) (\log (\cos (e+f x))+\log (\tan (e+f x)))}{4 f} \]
[In]
[Out]
Time = 0.18 (sec) , antiderivative size = 58, normalized size of antiderivative = 1.09
method | result | size |
derivativedivides | \(\frac {b \left (-\frac {\cot \left (f x +e \right )^{2}}{2}-\ln \left (\sin \left (f x +e \right )\right )\right )+a \left (-\frac {\cot \left (f x +e \right )^{4}}{4}+\frac {\cot \left (f x +e \right )^{2}}{2}+\ln \left (\sin \left (f x +e \right )\right )\right )}{f}\) | \(58\) |
default | \(\frac {b \left (-\frac {\cot \left (f x +e \right )^{2}}{2}-\ln \left (\sin \left (f x +e \right )\right )\right )+a \left (-\frac {\cot \left (f x +e \right )^{4}}{4}+\frac {\cot \left (f x +e \right )^{2}}{2}+\ln \left (\sin \left (f x +e \right )\right )\right )}{f}\) | \(58\) |
parallelrisch | \(\frac {\left (-2 a +2 b \right ) \ln \left (\sec \left (f x +e \right )^{2}\right )+\left (4 a -4 b \right ) \ln \left (\tan \left (f x +e \right )\right )-\cot \left (f x +e \right )^{2} \left (\cot \left (f x +e \right )^{2} a -2 a +2 b \right )}{4 f}\) | \(66\) |
norman | \(\frac {-\frac {a}{4 f}+\frac {\left (a -b \right ) \tan \left (f x +e \right )^{2}}{2 f}}{\tan \left (f x +e \right )^{4}}+\frac {\left (a -b \right ) \ln \left (\tan \left (f x +e \right )\right )}{f}-\frac {\left (a -b \right ) \ln \left (1+\tan \left (f x +e \right )^{2}\right )}{2 f}\) | \(73\) |
risch | \(-i x a +i x b -\frac {2 i a e}{f}+\frac {2 i b e}{f}-\frac {2 \left (2 a \,{\mathrm e}^{6 i \left (f x +e \right )}-b \,{\mathrm e}^{6 i \left (f x +e \right )}-2 a \,{\mathrm e}^{4 i \left (f x +e \right )}+2 b \,{\mathrm e}^{4 i \left (f x +e \right )}+2 a \,{\mathrm e}^{2 i \left (f x +e \right )}-b \,{\mathrm e}^{2 i \left (f x +e \right )}\right )}{f \left ({\mathrm e}^{2 i \left (f x +e \right )}-1\right )^{4}}+\frac {a \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}-1\right )}{f}-\frac {\ln \left ({\mathrm e}^{2 i \left (f x +e \right )}-1\right ) b}{f}\) | \(154\) |
[In]
[Out]
none
Time = 0.26 (sec) , antiderivative size = 85, normalized size of antiderivative = 1.60 \[ \int \cot ^5(e+f x) \left (a+b \tan ^2(e+f x)\right ) \, dx=\frac {2 \, {\left (a - b\right )} \log \left (\frac {\tan \left (f x + e\right )^{2}}{\tan \left (f x + e\right )^{2} + 1}\right ) \tan \left (f x + e\right )^{4} + {\left (3 \, a - 2 \, b\right )} \tan \left (f x + e\right )^{4} + 2 \, {\left (a - b\right )} \tan \left (f x + e\right )^{2} - a}{4 \, f \tan \left (f x + e\right )^{4}} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 124 vs. \(2 (42) = 84\).
Time = 1.32 (sec) , antiderivative size = 124, normalized size of antiderivative = 2.34 \[ \int \cot ^5(e+f x) \left (a+b \tan ^2(e+f x)\right ) \, dx=\begin {cases} \tilde {\infty } a x & \text {for}\: e = 0 \wedge f = 0 \\x \left (a + b \tan ^{2}{\left (e \right )}\right ) \cot ^{5}{\left (e \right )} & \text {for}\: f = 0 \\\tilde {\infty } a x & \text {for}\: e = - f x \\- \frac {a \log {\left (\tan ^{2}{\left (e + f x \right )} + 1 \right )}}{2 f} + \frac {a \log {\left (\tan {\left (e + f x \right )} \right )}}{f} + \frac {a}{2 f \tan ^{2}{\left (e + f x \right )}} - \frac {a}{4 f \tan ^{4}{\left (e + f x \right )}} + \frac {b \log {\left (\tan ^{2}{\left (e + f x \right )} + 1 \right )}}{2 f} - \frac {b \log {\left (\tan {\left (e + f x \right )} \right )}}{f} - \frac {b}{2 f \tan ^{2}{\left (e + f x \right )}} & \text {otherwise} \end {cases} \]
[In]
[Out]
none
Time = 0.24 (sec) , antiderivative size = 52, normalized size of antiderivative = 0.98 \[ \int \cot ^5(e+f x) \left (a+b \tan ^2(e+f x)\right ) \, dx=\frac {2 \, {\left (a - b\right )} \log \left (\sin \left (f x + e\right )^{2}\right ) + \frac {2 \, {\left (2 \, a - b\right )} \sin \left (f x + e\right )^{2} - a}{\sin \left (f x + e\right )^{4}}}{4 \, f} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 245 vs. \(2 (49) = 98\).
Time = 0.73 (sec) , antiderivative size = 245, normalized size of antiderivative = 4.62 \[ \int \cot ^5(e+f x) \left (a+b \tan ^2(e+f x)\right ) \, dx=\frac {32 \, {\left (a - b\right )} \log \left (\frac {{\left | -\cos \left (f x + e\right ) + 1 \right |}}{{\left | \cos \left (f x + e\right ) + 1 \right |}}\right ) - 64 \, {\left (a - b\right )} \log \left ({\left | -\frac {\cos \left (f x + e\right ) - 1}{\cos \left (f x + e\right ) + 1} + 1 \right |}\right ) - \frac {{\left (a + \frac {12 \, a {\left (\cos \left (f x + e\right ) - 1\right )}}{\cos \left (f x + e\right ) + 1} - \frac {8 \, b {\left (\cos \left (f x + e\right ) - 1\right )}}{\cos \left (f x + e\right ) + 1} + \frac {48 \, a {\left (\cos \left (f x + e\right ) - 1\right )}^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} - \frac {48 \, b {\left (\cos \left (f x + e\right ) - 1\right )}^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}}\right )} {\left (\cos \left (f x + e\right ) + 1\right )}^{2}}{{\left (\cos \left (f x + e\right ) - 1\right )}^{2}} - \frac {12 \, a {\left (\cos \left (f x + e\right ) - 1\right )}}{\cos \left (f x + e\right ) + 1} + \frac {8 \, b {\left (\cos \left (f x + e\right ) - 1\right )}}{\cos \left (f x + e\right ) + 1} - \frac {a {\left (\cos \left (f x + e\right ) - 1\right )}^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}}}{64 \, f} \]
[In]
[Out]
Time = 11.97 (sec) , antiderivative size = 74, normalized size of antiderivative = 1.40 \[ \int \cot ^5(e+f x) \left (a+b \tan ^2(e+f x)\right ) \, dx=\frac {\ln \left (\mathrm {tan}\left (e+f\,x\right )\right )\,\left (a-b\right )}{f}-\frac {\frac {a}{4}-{\mathrm {tan}\left (e+f\,x\right )}^2\,\left (\frac {a}{2}-\frac {b}{2}\right )}{f\,{\mathrm {tan}\left (e+f\,x\right )}^4}-\frac {\ln \left ({\mathrm {tan}\left (e+f\,x\right )}^2+1\right )\,\left (\frac {a}{2}-\frac {b}{2}\right )}{f} \]
[In]
[Out]